package com.ynet.eq.haiqing.common.valid;

import javax.validation.ConstraintValidator;
import javax.validation.ConstraintValidatorContext;

/**
 * @author 胡超雄
 * @date 2021/5/13 16:15
 * @desc
 */
public class _IDCustomValid implements ConstraintValidator<IDCustomValid,String> {

    @Override
    public void initialize(IDCustomValid constraintAnnotation) {

    }

    @Override
    public boolean isValid(String value, ConstraintValidatorContext context) {
        if(null == value) {
            return false;
        }
        if(value.trim().length()>=5) {
            return true;
        }
        return false;
    }
}
